﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SD.Database.Classes
{
   public  class WorldCreator
    {
       int radious = 0;
       double angle = 0;
       Random r = new Random();
       public List<int> NextSystem()
       {
           if (radious == 0)
           {
               radious += 3;
               return new List<int>() { 0, 0 };
           }
           else
           {
               int dx = r.Next(1,3);
               List<int> tmp = new List<int>() { (int)(radious * Math.Sin(angle) + dx), (int)(radious * Math.Cos(angle) + dx) };
               angle += (Math.PI / radious);
               if (angle >= Math.PI * 2)
               {
                   radious += 3;
                   angle = 0;
               }
               return tmp;
           }
       }
    }
}
